//
//  TKUpdateSDK.h
//  TKUpdateSDK
//
//  Created by Taikang.com on 2018/4/17.
//  Copyright © 2018年 Taikang.com. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol TKUpdateSDKDelegate <NSObject>
@optional
/**
 *  @method  retrenInfomationWithMessage:isForce:
 *  @discribtion 获取返回值代理方法
 *  @param  messageString  提示信息
 */
-(void)retrenInfomationWithMessage:(NSString *)messageString isForce:(BOOL)isForce;
@end

typedef void (^TKUpdateSDKDictionaryBlock)(NSDictionary *dataDictionary);
typedef void (^TKUpdateSDKBlock)(NSString *messageString,BOOL isForce);
/**带viersion的返回block*/
typedef void (^TKUpdateCheckSDKBlock)(NSString *messageString,NSString *version,BOOL isForce);
@interface TKUpdateSDK : NSObject


/**
 *  @method  sessionStartWithReturenBlock:
 *  @discribtion 开启任务
 *  @param  accesskey  注册码
 *  @param  returnBlock  返回block
 */
+(void)sessionStartWithAccesssKey:(NSString *)accesskey returenBlock:(TKUpdateSDKBlock)returnBlock;

/**
 *  @method  sessionStarted:
 *  @discribtion 开启任务--通过delegate获取数据
 *  @@param delegate 代理
 */
+(void)sessionStartWithAccesssKey:(NSString *)accesskey delegate:(id<TKUpdateSDKDelegate>) delegate;

/**与其他方法一样，区别在于更新信息需要返回version数据*/
+(void)sessionCheckWithAccesssKey:(NSString *)accesskey returenBlock:(TKUpdateCheckSDKBlock)returnBlock;
/**
 *  @method  sessionStartWithminiProgramKey:miniProgramReturenBlock
 *  @discribtion 开启任务-
 *  @param  ditionary  入参字典
 *  @param  miniProgramReturenBlock  返回block
 */
+(void)sessionStartWithMiniProgramDionary:(NSDictionary *)ditionary  miniProgramReturenBlock:(TKUpdateSDKDictionaryBlock)miniProgramReturenBlock;



@end

